Skip to main content
GET
/
v1
/
tasks
Get Tasks
curl --request GET \
  --url https://api.xpander.ai/v1/tasks \
  --header 'x-api-key: <api-key>'
{
  "items": [
    {
      "id": "<string>",
      "agent_id": "<string>",
      "user_id": "<string>",
      "parent_task_id": "<string>",
      "triggering_agent_id": "<string>",
      "organization_id": "<string>",
      "status": "pending",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "source_node_type": "<string>",
      "result": "<string>",
      "title": "<string>"
    }
  ],
  "total": 123,
  "page": 123,
  "per_page": 123,
  "total_pages": 123
}
Retrieve a paginated list of tasks with optional filtering capabilities. Useful for monitoring task execution across your organization or for specific agents and users.

Query Parameters

page
integer
default:1
Page number (starting from 1)
per_page
integer
default:20
Items per page (maximum 50)
status
string
Filter by task status: queued, running, completed, failed, cancelled
agent_id
string
Filter by specific agent ID
user_id
string
Filter by user ID who created the task

Response

items
array
Array of task objects
total
integer
Total number of tasks across all pages
page
integer
Current page number
per_page
integer
Number of items per page
total_pages
integer
Total number of pages available

Example Request

# List all tasks
curl -X GET -H "x-api-key: YOUR_API_KEY" \
  "https://api.xpander.ai/v1/tasks?page=1&per_page=3"

# Filter by status
curl -X GET -H "x-api-key: YOUR_API_KEY" \
  "https://api.xpander.ai/v1/tasks?status=completed&page=1&per_page=10"

# Filter by agent
curl -X GET -H "x-api-key: YOUR_API_KEY" \
  "https://api.xpander.ai/v1/tasks?agent_id=38551c1d-a16b-454f-84d4-68f431ba608b&page=1"

Example Response

{
  "items": [
    {
      "id": "3287cd69-51eb-4ffd-af24-9a2c7e63f2c7",
      "agent_id": "47c3b020-9a6b-4699-8d94-d92d71929b53",
      "user_id": "c9b4465d-0795-4493-9a23-8fc7cf6d3283",
      "parent_task_id": null,
      "triggering_agent_id": null,
      "organization_id": "91fbe9bc-35b3-41e8-b59d-922fb5a0f031",
      "status": "completed",
      "created_at": "2025-11-06T06:46:02.104705Z",
      "updated_at": "2025-11-06T06:46:58.136813Z",
      "source_node_type": "sdk",
      "result": "The content has been saved as a new Notion page...",
      "title": "Git Diff"
    },
    {
      "id": "333897e5-1c35-4598-a6ad-af5e0c101c84",
      "agent_id": "38551c1d-a16b-454f-84d4-68f431ba608b",
      "user_id": null,
      "parent_task_id": null,
      "triggering_agent_id": null,
      "organization_id": "91fbe9bc-35b3-41e8-b59d-922fb5a0f031",
      "status": "completed",
      "created_at": "2025-11-06T06:41:54.891936Z",
      "updated_at": "2025-11-06T06:41:58.172060Z",
      "source_node_type": "sdk",
      "result": "4",
      "title": "API Test - Simple Math"
    }
  ],
  "total": 1000,
  "page": 1,
  "per_page": 3,
  "total_pages": 334
}

Authorizations

x-api-key
string
header
required

API Key for authentication

Query Parameters

page
integer
default:1

Page number (starting from 1)

Required range: x >= 1
per_page
integer
default:20

Items per page (max 50)

Required range: 1 <= x <= 50
user_id
string

filter by user id (optional)

parent_task_id
string

filter by parent task id (optional)

triggering_agent_id
string

filter by triggering agent id (parent calling agent) (optional)

status
enum<string>

filter by task status (optional)

Available options:
pending,
executing,
paused,
error,
failed,
completed,
stopped
internal_status
string

filter by internal status (optional)

Response

Successful Response

items
TasksListItem · object[]
required
total
integer
required
page
integer
required
per_page
integer
required
total_pages
integer
required